package com.quick.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.quick.mapper.OrderMapper;
import com.quick.order.dto.BaseOrderDTO;
import com.quick.order.dto.UserOrderDTO;
import com.quick.order.pojo.BaseOrder;
import com.quick.service.IOrderService;
import com.quick.util.Convert;

@Service
public class OrderServiceImpl implements IOrderService{
	
	@Autowired
	private OrderMapper orderMapper;

	@Override
	public Boolean submitOrder(UserOrderDTO uo) {
		BaseOrderDTO order = uo.getBaseOrder();
		BaseOrder baseOrder = Convert.convert(order, BaseOrder.class);
		orderMapper.insert(baseOrder);
		return null;
	}

}
